<%@ page import="cn.darkfire.web.POJO.User" %>
<%@ page import="java.util.Arrays" %>
<%@ page import="java.util.HashMap" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.Set" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/10/12
  Time: 11:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>信息展示</title>
</head>
<body>
<%
    HashMap<String,User> users = (HashMap<String, User>)session.getAttribute("users");
    User user = (User)session.getAttribute("user");
    // response.setHeader("Refresh", "3;URL=./destory.jsp");

%>
<center>
        姓名:<%=user.getName()%><br>
        年龄:<%=user.getAge()%><br>
        爱好:
        <%
                for(String hobby:user.getHobbys()){
                    if(hobby.equals("C")){
                        out.print("<li>C语言</li>");
                    }else if(hobby.equals("C_Plus")){
                        out.print("<li>C++语言</li>");
                    }else{
                        out.print("<li>JAVA 语言</li>");
                    }
                }

%><br>
    <a href="IdeaProjects/servlet_learn/web/sy3/allUser.jsp">查看所有用户信息</a>
    <a href='IdeaProjects/servlet_learn/web/sy3/index.html'>返回主页继续登记</a>
</center>
</body>
</html>
